package com.tz.crm.service.impl;

import com.tz.crm.dao.GlobalConfigDao;
import com.tz.crm.entity.GlobalConfig;
import com.tz.crm.service.GlobalConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * 其他设置菜单
 */
@Service
@Transactional
public class GlobalConfigServiceImpl extends BaseServiceImpl<GlobalConfig, String> implements GlobalConfigService {

    @Autowired
    private GlobalConfigDao globalConfigDao;

    /**
     * 有参构造
     *
     * @param globalConfigDao 注入的组件
     */
    @Autowired
    public GlobalConfigServiceImpl(GlobalConfigDao globalConfigDao) {
        this.globalConfigDao = globalConfigDao;
        super.setBaseDao(globalConfigDao);
    }

    @Override
    public GlobalConfig findByCode(String code) {
        return globalConfigDao.findByCode(code);
    }
}
